package org.scau.studentevaluation.client;

import org.scau.studentevaluation.entity.dos.ActDO;
import org.scau.studentevaluation.entity.response.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 通过 Feign 访问AttendedStudentList微服务
 * @Author: x1aolone
 * @Date: 2020/8/27 16:20
 */
@FeignClient(value = "eureka-client-act",
        fallback = ActClientHystrix.class)
public interface ActClient {

    /**
     * 【测试通过】
     * 通过feign调用Act模块中获取Act的方法
     * 通过actId从act表中获取对应的actDO
     * @param actId
     * @return
     */
    @RequestMapping(value = "/act/findAct/{actId}",
            method = RequestMethod.GET)
    Result<ActDO> getActById(@RequestParam("actId") Long actId);


}
